package service.impl;

import dao.BlogDao;
import enity.Blog;
import service.BlogService;

import java.util.List;

public class BlogServiceImpl implements BlogService {
    private BlogDao blogDao=new BlogDao();
    @Override
    public int deleteBlog(int blogId) {
        return blogDao.delete(blogId);
    }

    @Override
    public Blog getBlog(int blogId) {
        return blogDao.getBlog(blogId);
    }

    @Override
    public int addBlog(Blog blog) {
        return blogDao.insert(blog);
    }

    @Override
    public List<Blog> getBlogs() {
        return blogDao.getBlogs();
    }
}
